<?php defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php $iso = split( '=', _ISO );
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
<?php mosShowHead(); ?>
<?php
if ( $my->id ) {
	initEditor();
}

if ((mosCountModules( 'user1' )) && (mosCountModules( 'user2' ))) {
//if both modules are loaded, we need a 50%-layout for them
	$usera = 'user1';
	$userb = 'user2';
} else if ((mosCountModules( 'user1' )) || (mosCountModules( 'user2' ))) {
// if only one, then 100% no matter which one.
	$usera = 'user3';
	$userb = 'user3';
}
$option				= mosGetParam($_REQUEST, 'option', '');
$task				= mosGetParam($_REQUEST, 'task', '');
?>
<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
<link href="<?php echo $mosConfig_live_site; ?>/templates/html_ngayhomnay/css/style.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $mosConfig_live_site; ?>/templates/html_ngayhomnay/css/page.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/html_ngayhomnay/js/jquery-1.2.6.min.js"></script>
<!-- Tooltips -->
<script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/html_ngayhomnay/js/main.js"></script>
<link href="<?php echo $mosConfig_live_site; ?>/templates/html_ngayhomnay/css/tipTip.css" rel="stylesheet" type="text/css" />
<!-- End Tooltips -->
<!-- Ton tai User AND CHANGE BACKGROUND BODY -->
<link href="<?php echo $mosConfig_live_site; ?>/templates/html_ngayhomnay/css/user_style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/html_ngayhomnay/js/jquery.desktopdesigner.js"></script>
<script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/includes/js/joomla.javascript.js"></script>
<link href="<?php echo $mosConfig_live_site; ?>/templates/html_ngayhomnay/css/css3.css" rel="stylesheet" type="text/css" />
</head>

<body>
	<div id="wallpaper">
		<div id="page" class="clearfix">
			<?php
			if (!$task && $my->id==0){
				require_once ('modules/nhn_home_section.php');	
			} else{
				?>
				<div id="website" class="clearfix style-css3">
					<!-- TOP -->
					<div id="w_topmenu">
						<div class="w_menu_small">
							<ul>
								<li><a href="#">Đặt làm trang chủ</a></li>
								<li><a href="#">Ghi nhớ trang này</a></li>
								<li><a href="#">Giới thiệu bạn bè</a></li>
								<li><a href="#">Báo lỗi</a></li>
							</ul>
						</div>
						<div class="w_register">
							<?php mosLoadModules('icon');?>
						</div>
					</div>
					<div class="clearfix"></div>
					
					<!-- HEADER -->
					<div id="w_header">
						<div style="float:left;">
							<embed width="364" height="90" allowscriptaccess="always" wmode="transparent" loop="true" play="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="link=http%3A//180.148.142.153/clk.aspx%3Ft%3D5%26b%3D12926%26s%3D1%26l%3Dhttp%253A//mandaringarden.vn/&amp;zoneid=HalfBanner1&amp;actionTag=http%3A//180.148.142.153/act.aspx%3Ft%3D5%26b%3D12926%26r%3D0.13430293545356942" src="http://180.148.142.152/AdImages/2011/10/05/Mandarin_364x90_260811.swf">
						</div>
						<div style="float:left; margin-left:5px;">
							<embed width="364" height="90" allowscriptaccess="always" wmode="transparent" loop="true" play="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="link=http%3A//180.148.142.153/clk.aspx%3Ft%3D5%26b%3D10852%26s%3D1%26l%3Dhttp%253A//www.nhommua.com/tp-ho-chi-minh/deals/hoa-lan-spa-7F010205027C.html%253Futm_source%253Dvnexpress%2526utm_medium%253Dhcm_hoalanspa%2526utm_campaign%253Dvnexpress_trangchu_halfphai_364x90_hcm_hoalanspa_oanh_20oct11&amp;zoneid=HalfBanner2&amp;actionTag=http%3A//180.148.142.153/act.aspx%3Ft%3D5%26b%3D10852%26r%3D0.2756943947891275" src="http://180.148.142.152/AdImages/2011/10/20/vnexpress_trangchu_halfphai_364x90_hcm_hoalanspa_oanh_20oct11.swf">
						</div>
					</div>
					<div class="clearfix"></div>
					
					<!-- MENUTOP -->
					<?php
					if ($option=='com_news' || $option=='com_user'){ //Check ton tai User ko
						require ('modules/menu_top_user.php');
					}else{
						require ('modules/w_menuTop.php');
					} 
					?>
					<div class="clearfix"></div>
					
					<!-- MAIN -->
					<div id="w_main">
						<div id="w_content">
							<?php if ($option=='com_content') require ('modules/w_section.php');?>
							
							<?php if ($option=='com_content') require ('modules/w_vip.php'); ?>	
							
							<?php 
							if ($option!='com_content'){
								$style = ' style="margin-top:0;"';
							}else{
								$style = '';
							}	
							?>
							<div class="w_box_show_content style-css3"<?php echo $style;?>>
								<?php mosMainBody();?>
							</div>
							
							<?php if ($option=='com_content') require ('modules/w_shop.php');?>	
						</div>
						<div id="w_right">
							<?php
							if ($option=='com_content'){
								require ('modules/w_ctkhuyenmai.php');
								require ('modules/w_shoptb.php');
							}
							if ($option=='com_news'){
								require ('modules/w_ctkhuyenmai_others.php');
							} 
							?>
							<div class="w_advertising">
								<img class="style-css3" src="<?php echo $mosConfig_live_site;?>/templates/html_ngayhomnay/images/adver.gif" alt="" border="0" />
							</div>
							<div class="clearfix"></div>
							<div class="w_advertising">
								<img class="style-css3" src="<?php echo $mosConfig_live_site;?>/templates/html_ngayhomnay/images/zing_new.jpg" alt="" border="0" />
							</div>
						</div>
					</div>
					<div class="clearfix"></div>
					<div id="footer">
					</div>
				</div>
				<?php
			}
			?>
		</div>
	</div>
</body>
<script type="text/javascript">
	$(document).ready(function(){
	$height_head= $('#w_header').height()+10;
	$('#menu_top_user').css('top', height_headh);	
	<?php if ($option == 'com_news' || $option == 'com_user'){?>
	$('#w_main').css('margin-top','65px');
	<?php }?>	
	});
</script>
</html>